package cn.dlc.com.main;

import com.caucho.hessian.client.HessianProxyFactory;

import cn.dlc.com.service.UserService;

public class ClientMain {

	public static void main(String[] args) throws Exception{
		// 远程调用的地址
		String url = "http://localhost:8082/api/service";
		// 创建代理工厂对象
		HessianProxyFactory factory = new HessianProxyFactory();
		// 创建当前接口对象
		UserService userService = (UserService) factory.create(url);
		
		System.out.println(userService.sayHello("muyu"));
	}
}
